
import vue from '@vitejs/plugin-vue'
import createCompression from './compression'
import createAutoImport from './autoImport'
import createSvgIcon from './svgIcon'
import createSetupExtend from './setupExtend'
import createCdnImport from './cdnImport'
import createUnocss from './unocss'
import createAntDesign from './antdesign'

export default function createVitePlugins(viteEnv, isBuild = false) {
    const vitePlugins = [vue()]
    vitePlugins.push(createAutoImport())
    vitePlugins.push(createSetupExtend())
    vitePlugins.push(createSvgIcon(isBuild))
    vitePlugins.push(createCdnImport(isBuild))
    vitePlugins.push(createUnocss())
    vitePlugins.push(createAntDesign())
    vitePlugins.push(...createCompression(isBuild,viteEnv))
    return vitePlugins
}
